package com.hotel.BL;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import data.HoardingData;

public class HoardingLogic extends AbstractBL {
	
	//query desc order
	public List<HoardingData> QueryHoarding() throws ParseException
	{
		DateFormat df = new SimpleDateFormat("MMM dd yyyy kk:mm", Locale.ENGLISH);
		
		List<HoardingData> list = new ArrayList<HoardingData>();
		
		HoardingData item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 16:50"));
		item.setRoom("203");
		item.setAmount(590.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 15:56"));
		item.setRoom("105");
		item.setAmount(1230.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 14:12"));
		item.setRoom("203");
		item.setAmount(430.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 13:15"));
		item.setRoom("302");
		item.setAmount(34.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 12:22"));
		item.setRoom("105");
		item.setAmount(590.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 11:34"));
		item.setRoom("202");
		item.setAmount(1205.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 10:35"));
		item.setRoom("211");
		item.setAmount(850.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 9:42"));
		item.setRoom("121");
		item.setAmount(75.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 8:01"));
		item.setRoom("212");
		item.setAmount(890.0);
		list.add(item);
		
		item = new HoardingData();
		item.setTime(df.parse("Dec 17 2012 7:05"));
		item.setRoom("204");
		item.setAmount(95.0);
		list.add(item);
		
		return list;
	}
}
